package com.wicket.okrapp.integration.dto;

import com.wicket.okrapp.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Objects;
import javax.validation.constraints.NotNull;
import lombok.Data;

/**
 * @desc ObjectivePlanningExtendDto
 * @使用场景
 */
@Data
public class ObjectivePlanningExtendDto
  extends BaseDto
  implements Serializable {

  /**
   * 指标扩展规划设置ID
   */
  @ApiModelProperty("指标扩展规划设置ID")
  private String objectivePlanningExtendId;

  /**
   * 归属指标ID
   */
  @ApiModelProperty("归属指标ID")
  private String objectiveId;

  /**
   * 虚拟组织下部门ID
   */
  @NotNull(message = "虚拟组织下部门ID不能为空")
  @ApiModelProperty("虚拟组织下部门ID")
  private String deptId;

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;
    ObjectivePlanningExtendDto that = (ObjectivePlanningExtendDto) o;
    return (
      objectivePlanningExtendId == that.objectivePlanningExtendId &&
      objectiveId == that.objectiveId &&
      deptId == that.deptId
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(
      super.hashCode(),
      objectivePlanningExtendId,
      objectiveId,
      deptId
    );
  }

}
